﻿#include "Matrix.hpp"
#include "WindowsWindow.h"
#include "Device.h"
#include "SpendTime.h"
#include "Color.h"
#include <random>
#include <vector>

const TCHAR* Title = _T("Sampler Windows");
constexpr int Width = 800;
constexpr int Height = 600;

static bool bClose = false;

LRESULT ScreenEvents(HWND Hwnd, UINT Msg, WPARAM WParam, LPARAM LParam) {
	switch (Msg)
	{
	case WM_CLOSE:
		bClose = true;
		break;
	default:
		return DefWindowProc(Hwnd, Msg, WParam, LParam);
	}
	return 0;
}

int main(int argc, char** argv) {
	FWindowsWindow Window;
	FDevice Device;
	WindowRALL WindowRALL(&Window, Width, Height, Title, bClose);
	DeviceRALL DeviceRALL(&Device, Width, Height, Window.ScreenFrameBuffer);

	while (!bClose) {
		SpendTime SpendTime;
		Device.ClearDevice();
		Window.ScreenUpdate();
	}
	return 0;
}





